//
//  ZHBaseViewController.m
//  ZHLifeCircle
//
//  Created by user on 15/11/21.
//  Copyright © 2015年 heima. All rights reserved.
//

#import "ZHBaseViewController.h"
#import "MBProgressHUD.h"
#import "UIView+Toast.h"
#import "UIView+FrameSetter.h"
@interface ZHBaseViewController ()

@property (nonatomic, strong) MBProgressHUD *progressHUD;

@end

@implementation ZHBaseViewController

//显示网络加载
- (void)showNetLoadView{
    //????????网络加载框的位置是否根self.view有关
    self.progressHUD = [[MBProgressHUD alloc] initWithView:self.view];
    [self.progressHUD show:YES];
    [self.view addSubview:self.progressHUD];
}
//网络加载完成后,视图消失
- (void)dismissNetLoadView{
    if (self.progressHUD) {
        //移除
        [self.progressHUD removeFromSuperview];
        //隐藏
        [_progressHUD hide:YES];
        //释放
        _progressHUD = nil;
    }
}
//设置网络加载提示
- (void)setShowLoadViewWithMessage:(NSString *)message{
    
}


//用户提示信息
- (void)showtoast:(NSString *)message{
    [self.view makeToast:message];
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
